﻿<Window x:Class="CECB.Impact.Project_Questions_Window"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
      
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Project_Questions_Window" 
           WindowStartupLocation="CenterScreen"   Background="#AA000000" 
        AllowsTransparency="True" WindowStyle="None" WindowState="Maximized"
        mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006">



    <Window.Resources>

        <Storyboard x:Key="drop">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="groupBox">
                <EasingDoubleKeyFrame KeyTime="0" Value="0.02"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="1.194">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <BackEase EasingMode="EaseOut" Amplitude="-3"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="groupBox">
                <EasingDoubleKeyFrame KeyTime="0" Value="-120"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="23.75">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <BackEase EasingMode="EaseOut" Amplitude="-3"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>

    </Window.Resources>
    <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Width="900" Height="550">


        <Rectangle Margin="0,0,0,0" Stroke="White" RadiusY="19.5" RadiusX="19.5" StrokeThickness="4" Height="550" Width="900">
            <Rectangle.Effect>
                <DropShadowEffect Direction="330" BlurRadius="24" ShadowDepth="13" />
            </Rectangle.Effect>
            <Rectangle.Fill>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="Black" Offset="0" />
                    <GradientStop Color="#FFA3A1A1" Offset="0.494" />
                    <GradientStop Color="#FF272121" Offset="0" />
                    <GradientStop Color="#FF272121" Offset="1" />
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>


        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Width="880" Height="550">
            <Grid.RowDefinitions>
                <RowDefinition Height="53*" />
                <RowDefinition Height="408*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="10" />
                <ColumnDefinition Width="544" />
                <ColumnDefinition Width="318" />
                <ColumnDefinition Width="8*" />
            </Grid.ColumnDefinitions>
            <TextBlock Height="55" HorizontalAlignment="Left" Grid.ColumnSpan="3" Margin="45,0,0,0" Name="textBlock1" Text="Project Impacts" VerticalAlignment="Top" FontSize="35" Foreground="White" FontStyle="Italic" FontWeight="ExtraBold" Width="285" />

            <StackPanel Grid.Column="1" Grid.Row="1" Height="auto" HorizontalAlignment="Left" Name="stackPanel1" VerticalAlignment="Top" Width="544" Orientation="Vertical" Margin="0,10,0,0" Background="{x:Null}">
                <WrapPanel Orientation="Horizontal" Height="32">
                    <TextBlock Height="35" Name="textBlock2" Text="   Select a project"   FontSize="20" Foreground="White"  Width="200" />
                    <toolkit:AutoCompleteBox Name="ProjectAutocompleteTextBox"  Width="270" Margin="60,0,0,0" Height="30"  ValueMemberPath="proj_reference"  FilterMode="Contains"  ItemsSource="{Binding}"  TabIndex="1" IsTabStop="True"  SelectionChanged="ReferenceTextBox_SelectionChanged" FontSize="16" Background="White" Opacity="1" HorizontalAlignment="Center" UseLayoutRounding="False" BorderBrush="#FFF8F8F8" BorderThickness="2">
                        <toolkit:AutoCompleteBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="{Binding Path=proj_reference}"/>
                                    <TextBlock Text=" - "/>
                                    <TextBlock Text="{Binding Path=proj_name}"/>
                                </StackPanel>
                            </DataTemplate>
                        </toolkit:AutoCompleteBox.ItemTemplate>
                    </toolkit:AutoCompleteBox>
                </WrapPanel>
                <WrapPanel Name="ProjectDetailsWrapPanel" Margin="0,0,0,0" Orientation="Vertical" Height="auto" Background="DimGray" OpacityMask="{x:Null}">
                    <WrapPanel Height="32" Margin="10,0,0,0">
                        <TextBlock Height="29" Name="textBlock3" Text="Project Reference: "    TextAlignment="Right"   FontSize="16" Foreground="White"  Width="240"  Background="#FF3E3832" VerticalAlignment="Stretch" />
                        <Label Content="{Binding Path=proj_reference}" Height="29" FontSize="14" Foreground="#FF3E3832" Name="labelProReference" Margin="10,0,0,0" Width="270" VerticalAlignment="Top" Background="#FFF0F0F0"  BorderBrush="#FFB4B4B4" BorderThickness="1" />
                    </WrapPanel>
                    <WrapPanel Height="32"  Margin="10,0,0,0"  >
                        <TextBlock Height="29" Name="textBlock4" Text="Project Name: " TextAlignment="Right"  FontSize="16" Foreground="White"  Width="240" Background="#FF3E3832" VerticalAlignment="Stretch" />
                        <Label Content="{Binding Path=proj_name}" Height="29" FontSize="14" Foreground="#FF3E3832" Name="label5" Margin="10,0,0,0" Width="270" VerticalAlignment="Top"  Background="#FFF0F0F0" BorderBrush="#FFB4B4B4" BorderThickness="1" />
                    </WrapPanel>
                    <WrapPanel Height="32"  Margin="10,0,0,0"  >
                        <TextBlock Height="29" Name="textBlock6" Text="Project Team: "  TextAlignment="Right" FontSize="16" Foreground="White"  Width="240" Background="#FF3E3832" VerticalAlignment="Stretch" />
                        <Label Content="{Binding Path=proj_consultant}" Height="29" FontSize="14" Foreground="#FF3E3832" Name="label6" Margin="10,0,0,0" Width="270" VerticalAlignment="Top" Background="#FFF0F0F0" BorderBrush="#FFB4B4B4" BorderThickness="1" />
                    </WrapPanel>
                    <WrapPanel Height="32"  Margin="10,0,0,0"  >
                        <TextBlock Height="29" Name="textBlock5" Text="Project Category: " TextAlignment="Right"  FontSize="16" Foreground="White"  Width="240" Background="#FF3E3832" VerticalAlignment="Stretch" />
                        <Label Content="{Binding Path=ProjectTypes.ptype_name}" Height="29" FontSize="14" Foreground="#FF3E3832" Name="label3" Margin="10,0,0,0" Width="270" VerticalAlignment="Top" Background="#FFF0F0F0" BorderBrush="#FFB4B4B4" BorderThickness="1" />
                    </WrapPanel>
                </WrapPanel>
                <WrapPanel Name="AddQs" Margin="0,20,0,0" Orientation="Vertical" >
                    <WrapPanel Background="DimGray">
                        <TextBlock Height="25" Name="textBlock23" Text="Select Component: " TextAlignment="Right"  FontSize="18" Foreground="White"  Margin="10,0,0,0" Width="240" Background="#FF3E3832" />
                        <ComboBox Height="23" Name="comboBoxComponents" Width="270" Margin="10,0,0,0" DisplayMemberPath="cmpt_name" SelectedValuePath="cmpt_reference" />
                    </WrapPanel>
                    <WrapPanel Background="DimGray">
                        <TextBlock Height="25" Name="textBlock32" Text="Add New Impacts: " TextAlignment="Right"  FontSize="18" Foreground="White" Margin="10,0,0,0" Width="240" Background="#FF3E3832" />
                        <TextBox Height="25" Name="textBoxQuestion"  FontSize="14" Foreground="Black"  Width="230"  Margin="10,0,0,0" TextChanged="textBoxQuestion_TextChanged" Background="#FFF0F0F0" />
                        <Button Content="Add" Height="23" Name="button1" Width="40" Click="button1_Click" />
                    </WrapPanel>
                    <WrapPanel Background="DimGray" Margin="0,5,0,0" >
                        <TextBlock Height="25" Name="textBlock12" Text="Components and impacts"   FontSize="18" Foreground="#FFFCFCFC" Margin="10,0,0,0" Width="240" Background="#FF3E3832" />
                    </WrapPanel>
                    <WrapPanel Orientation="Horizontal" Margin="0,10,0,0">
                        <!--<ListView Grid.Row="1" Name="listViewQuestions" ItemsSource="{Binding}" Margin="1" MaxHeight="150" Height="150" SelectionChanged="listViewQuestions_SelectionChanged">
                        <ListView.View>
                            <GridView x:Name="questionsGridView">
                                <GridViewColumn Header="Component"  Width="150"  DisplayMemberBinding="{Binding Col1}" />
                                <GridViewColumn Header="Question"  Width="330"  DisplayMemberBinding="{Binding Col2}" />
                                <GridViewColumn Header="CompoentID"  Width="0"    DisplayMemberBinding="{Binding Col3}" />
                            </GridView>
                        </ListView.View>
                    </ListView>-->
                        <!--<DataGrid AutoGenerateColumns="False" Height="100" Width="400" Name="DataGridImpacts" CellEditEnding="DataGridImpacts_CellEditEnding">
                        <DataGrid.Columns>
                            <DataGridTextColumn Header="Component" Width="200"  Binding="{Binding Col1}"/>
                            <DataGridTextColumn Header="Impacts" Width="300" Binding="{Binding Col2}" />
                        </DataGrid.Columns>
                        
                    </DataGrid>-->
                        <DataGrid ItemsSource="{Binding ModelListe}" AutoGenerateColumns="False" Background="#FFF0F0F0" Height="150" HorizontalAlignment="Left" Margin="0,0,0,0" Name="dataGrid1" VerticalAlignment="Top" Width="550" BorderThickness="0" CanUserDeleteRows="True" CanUserResizeColumns="False" CanUserResizeRows="False" CanUserSortColumns="False" CanUserReorderColumns="False" ColumnHeaderHeight="30"  IsReadOnly="True" MinHeight="25" RowBackground="#FFBEBBBB" SelectionMode="Single" VerticalGridLinesBrush="#FF3E3832" FontSize="14" HorizontalContentAlignment="Center">
                            <DataGrid.Columns>
                                <DataGridTextColumn Binding="{Binding impt_reference}" CanUserReorder="False" Header="Component"  Width="auto" Foreground="Black"  />
                                <DataGridTextColumn Binding="{Binding impt_name }" CanUserReorder="False" Header="Impacts" Width="10*" Foreground="Black"/>

                            </DataGrid.Columns>
                        </DataGrid>
                    </WrapPanel>
                    <WrapPanel Orientation="Horizontal" Height="52">

                        <StackPanel Name="stackPanel14" Orientation="Horizontal" Margin="320,4,0,0" HorizontalAlignment="Right">

                            <Button Background="{x:Null}" BorderBrush="White" Click="CloseButton_Click" Height="44" Margin="2,0" Name="CloseButton" Width="98">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="*" />
                                    </Grid.ColumnDefinitions>
                                    <Image Grid.Column="0" Height="32" Margin="2" Source="images\close.png" Width="32" />
                                    <StackPanel Grid.Column="1" HorizontalAlignment="Stretch" Margin="2" VerticalAlignment="Center">
                                        <TextBlock Margin="0" Padding="0" Text="Remove" Foreground="White" TextWrapping="NoWrap" />
                                    </StackPanel>
                                </Grid>
                            </Button>
                            <Button Background="{x:Null}" BorderBrush="White" Click="SaveButton_Click" Height="44" Margin="2,0" Name="SaveButton" Width="98">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="*" />
                                    </Grid.ColumnDefinitions>
                                    <Image Grid.Column="0" Height="32" Margin="2" Source="images\save.png" Width="32" />
                                    <StackPanel Grid.Column="1" HorizontalAlignment="Stretch" Margin="2" VerticalAlignment="Center">
                                        <TextBlock Margin="0" Padding="0" Text="Save" Foreground="White" TextWrapping="NoWrap" />
                                    </StackPanel>
                                </Grid>
                            </Button>
                        </StackPanel>

                    </WrapPanel>

                </WrapPanel>
            </StackPanel>
            <Grid HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,21,6,0" Grid.Column="2" Grid.ColumnSpan="2">
                <Image Height="32" Margin="2" Source="/CECB;component/images/closeblack.png" Width="32" MouseLeftButtonDown="Image_MouseLeftButtonDown" />
            </Grid>
            <Grid Margin="12,5,33,72" Grid.Column="2" Grid.Row="1">
                <StackPanel Height="406" Name="stackPanel2" VerticalAlignment="Top" Orientation="Vertical" Margin="0,0,-33,0">
                    <WrapPanel Orientation="Vertical">
                        <TextBlock Height="25" Name="ads" Text="Add Existing Impacts: " HorizontalAlignment="Left"  FontSize="18" Foreground="White"  Width="177" TextAlignment="Right" />
                        <TextBox Grid.Column="2" Width="300" Margin="0,0,0,0" Height="30" Name="textBoxComponentSearch" VerticalAlignment="Top" FontSize="16" Background="White" Opacity="1" HorizontalAlignment="Center" TextChanged="textBoxComponentSearch_TextChanged" />
                    </WrapPanel>
                    <WrapPanel Height="410" x:Name="ListGroupBoxWrap">
                        <GroupBox x:Name="groupBox" Margin="0,0,0,0" BorderThickness="0" MaxHeight="420" Width="auto" Height="358">
                            <GroupBox.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform />
                                    <SkewTransform />
                                    <RotateTransform />
                                    <TranslateTransform />
                                </TransformGroup>
                            </GroupBox.RenderTransform>
                            <WrapPanel Width="auto" Margin="-5,-5,0,0" Height="400">
                                <ListBox x:Name="listBoxComponents" Margin="0,0,0,0" ScrollViewer.CanContentScroll="False" ScrollViewer.VerticalScrollBarVisibility="Hidden" ScrollViewer.HorizontalScrollBarVisibility="Visible" Height="346" Background="DimGray" SelectionChanged="listBoxComponents_SelectionChanged" Width="auto">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <WrapPanel Background="#FF3E3832" MaxWidth="300">
                                                <StackPanel Orientation="Horizontal" MaxWidth="300">
                                                    <!--<CheckBox IsChecked="{Binding Deleteable, Mode=TwoWay}" Name="CheckBoxActivity" VerticalAlignment="Center" HorizontalAlignment="Left"  />-->
                                                    <WrapPanel Orientation="Vertical" MaxWidth="300">
                                                        <Label Content="{Binding impt_name}" Height="30" Width="300" Foreground="White" HorizontalAlignment="Left" FontSize="15" />
                                                        <Label Content="{Binding Components.cmpt_name}" Height="22" Width="300" Foreground="White" HorizontalAlignment="Right" FontSize="10" />
                                                    </WrapPanel>
                                                </StackPanel>
                                            </WrapPanel>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </WrapPanel>
                        </GroupBox>
                    </WrapPanel>
                </StackPanel>
            </Grid>
        </Grid>
    </Grid>

</Window>
